#ifndef __ENTERBATTLEROOM_H__
#define __ENTERBATTLEROOM_H__
#include "BaseMessage.h"
#include "MessageCode.h"
USING_NS_CC;
using namespace std;
/**进入战斗房间
*自动生成类
*/
class EnterBattleRoom:public BaseMessage{
public:
	EnterBattleRoom(){}
	EnterBattleRoom(short roomId,float x,float y,short xSpeed,short ySpeed,char xDriction,char yDriction){
	  this->roomId=roomId;
	  this->x=x;
	  this->y=y;
	  this->xSpeed=xSpeed;
	  this->ySpeed=ySpeed;
	  this->xDriction=xDriction;
	  this->yDriction=yDriction;
	}
	
	
	
	
	
	/**获取short  房间id*/
	short getRoomId(){
		return this->roomId;
	}
	/**获取float  */
	float getX(){
		return this->x;
	}
	/**获取float  */
	float getY(){
		return this->y;
	}
	/**获取short  */
	short getXSpeed(){
		return this->xSpeed;
	}
	/**获取short  */
	short getYSpeed(){
		return this->ySpeed;
	}
	/**获取char  */
	char getXDriction(){
		return this->xDriction;
	}
	/**获取char  */
	char getYDriction(){
		return this->yDriction;
	}
	bool readImpl() {
		this->roomId=readShort();
		this->x=readFloat();
		this->y=readFloat();
		this->xSpeed=readShort();
		this->ySpeed=readShort();
		this->xDriction=readChar();
		this->yDriction=readChar();
		return true;
	}
	bool writeImpl() {
		writeShort(this->roomId);
		writeFloat(this->x);
		writeFloat(this->y);
		writeShort(this->xSpeed);
		writeShort(this->ySpeed);
		writeChar(this->xDriction);
		writeChar(this->yDriction);
		return true;
	}
	short getType() {
		return MessageCode::EnterBattleRoom_CODE;
	}
private:
	/**房间id*/
	short roomId;
	/***/
	float x;
	/***/
	float y;
	/***/
	short xSpeed;
	/***/
	short ySpeed;
	/***/
	char xDriction;
	/***/
	char yDriction;

};
#endif
